<%-- 
    Document   : edit-professor
    Created on : 13/06/2013, 14:51:10
    Author     : Eduardo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="Model.*"%>
<%@page import="Controller.*"%>
<%@page import="java.sql.*" %> 
<%@page import="java.io.*" %>

<%
    String id = request.getParameter("id");
    Query q = new Query();
    Professor rs = q.getProf(id);
%>
<script src="js/script.js"></script> 
<div class="modal-header">  
    <a class="close" data-dismiss="modal">×</a>  
    <h3>Editar professor(a): <% out.println(rs.getNome());%></h3>
</div>
<div class="modal-body">
    <div id="info"></div>
    <form class="form-horizontal" id="editar">
        <div class="control-group">
            <label class="control-label" for="inputNome">Nome:</label>
            <div class="controls">
                <input type="text" id="inputNome" placeholder="Nome" name="nome" value="<% out.println(rs.getNome());%>">
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputSiape">Siape:</label>
            <div class="controls">
                <input type="text" id="inputSiape" placeholder="Siape" name="siape" value="<% out.println(rs.getSiape());%>">    
            </div>
        </div>                          
        <div class="control-group">
            <label class="control-label" for="inputCH">Carga Horária:</label>
            <div class="controls">
                <input type="text" id="inputCH" placeholder="Carga Horária" name="cargahoraria" value="<% out.println(rs.getDedicacao());%>">    
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="inputEmail">Email:</label>
            <div class="controls">
                <input type="text" id="inputEmail" placeholder="Email" name="email" value="<% out.println(rs.getEmail());%>">    
            </div>
        </div>
        <input type="hidden" id="inputID" name="id" value="<% out.println(rs.getId());%>">
        <input type="hidden" id="action" name="action" value="editprofessor">
    </form>
</div>
<div class="modal-footer">  
    <a class="btn btn-success salvar" xform="editar" xid="<%=request.getParameter("id")%>" url="edit-professor.jsp">Salvar</a>  
    <a class="btn btn-inverse fechar" data-dismiss="modal">Fechar</a>  
</div>




